package com.hnevc.yourhealthmanager.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.lang.Nullable;

import java.util.Date;

@Data
@TableName("sport_record_table")
@ApiModel(value = "SportRecord",description = "运动记录数据，记录每一次的运动情况")
public class SportRecord {
    @TableId(value = "id",type = IdType.AUTO)
    @ApiModelProperty(value = "ID")
    private Integer id;
    @ApiModelProperty(value = "运动ID")
    private Integer sportId;
    @ApiModelProperty(value = "用户ID")
    private Integer userId;
    @ApiModelProperty(value = "运动典型图片")
    private String sportImage;
    @Nullable
    @ApiModelProperty(value = "运动时长")
    private Integer sportDuration;
    @ApiModelProperty(value = "运动步数")
    @Nullable
    private Integer sportSteps;
    @ApiModelProperty(value = "运动组数")
    @Nullable
    private Integer sportTimes;
    @ApiModelProperty(value = "运动时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:SS")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:SS")
    private Date sportDate;
}
